package com.dong.springbootweb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.FileInputStream;
import java.util.Map;

@RequestMapping("/hello")
//@RestController
@Controller
public class HelloController {
    /**
     * name:姓名
     */
     private String name;
     
    @ResponseBody
    @GetMapping("/hello")
    public String Hello() {
        return "hello";
    }

    @GetMapping("/success")
    public String success(Map<String,Object> maps) {
        maps.put("hello","你好");
        return "success";
    }

    public String error() {
        System.out.println();

        return "error";
    }


}
